package sk.sigp.aobot.base;

/**
 * responsible for holding 2 values, string as key and boolean as value
 * comparable by key string
 * @author mathew
 *
 */
public class DoubleVal implements Comparable<DoubleVal>{
	private String key;
	private Boolean data;
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public Boolean getData() {
		return data;
	}
	public void setData(Boolean data) {
		this.data = data;
	}
	
	@Override
	public String toString() {
		return getKey();
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj==null) return false;
		return this.key.equals(obj.toString());
	}
	public int compareTo(DoubleVal o) {
		return getKey().compareTo( o.getKey() );
	}
	public DoubleVal() {
		// TODO Auto-generated constructor stub
	}
	public DoubleVal(String key, Boolean data) {
		super();
		this.key = key;
		this.data = data;
	}
}
